/**
 * Created By zhangQ 2018/3/6
 */
import axiosUtils from '@api/env/axiosEnv'

let customAxios = axiosUtils._initAxios()

export function getFreightList (param) {
  return customAxios({
    url: '/main/track/getFreightList',
    method: 'post',
    data: {
      page: param.page,
      pageSize: 10
    }
  })
}

export function getTrackCodeList () {
  return customAxios({
    url: '/main/track/getTrackCodeListByStationCode',
    method: 'post'
  })
}

export function getTrackInfo (param) {
  return customAxios({
    url: '/main/track/getTrackInfo',
    method: 'post',
    data: {
      station: param.station,
      ddcc: param.ddcc,
      get_time: param.getTime
    }
  })
}

export function queryFreight (param) {
  return customAxios({
    url: '/queryFreight',
    method: 'post',
    data: {
      productNameId: param.productId,
      startStationCode: param.startStationCode,
      endStationCode: param.endStationCode,
      isSmqh: param.isSmqh,
      isSmzc: param.isSmzc,
      isShsm: param.isShsm,
      isSmxc: param.isSmxc,
      isTlzc: param.isTlzc
    }
  })
}
